package com.sj.parksdk.adapter.carmanage;

import android.view.View;

import androidx.annotation.NonNull;

import com.sj.parksdk.R;
import com.xuexiang.xui.adapter.recyclerview.BaseRecyclerAdapter;
import com.xuexiang.xui.adapter.recyclerview.RecyclerViewHolder;

public class FlowAdapterCarNumber extends BaseRecyclerAdapter<String> {

    public FlowAdapterCarNumber(String[] data) {
        super(data);
    }

    @Override
    protected int getItemLayoutId(int viewType) {
        return R.layout.parksdk_flowadapter_item_car_number;
    }

    @Override
    protected void bindData(@NonNull RecyclerViewHolder holder, int position, String item) {
        if ("-1".equals(item)) {
            holder.visible(R.id.rtv_item, View.GONE);
            holder.visible(R.id.rl_back, View.VISIBLE);
        } else {
            holder.visible(R.id.rtv_item, View.VISIBLE);
            holder.visible(R.id.rl_back, View.GONE);
        }
        holder.text(R.id.rtv_item, item);
    }
}